<?php
include "../lib/DAL/VaiTroHoiDong.php";
class VaiTroHoiDongBLL{
    function __construct(){
        
    }
    
    function __destruct(){
        
    }
    
    function setVaiTroHoiDongBLL($row){
        $vaitrohoidong= new VaiTroHoiDong();
        $vaitrohoidong->setVaiTroHoiDong($row['ma_vaitro'],$row['ten_vaitro']);
        return $vaitrohoidong;
         
    }
    
    public function getVaiTroHoiDong($ma_vthd){
        $sql = "select * from tbl_vaitro_hoidong where ma_vaitro ='".$ma_vthd."'";        
        $row = mysql_fetch_array(mysql_query($sql));
       return $this->setVaiTroHoiDongBLL($row);
        
    }
    public function getListVaitroHoiDong(){
      $result = mysql_query("select * from tbl_vaitro_hoidong");
      $arr_vaitrohoidong = array();
      
      while($row = mysql_fetch_array($result)){
        $arr_vaitrohoidong[] =  $this->setVaiTroHoiDongBLL($row);
      }
      return $arr_vaitrohoidong;
    }
    
    
    
}

?>